package saas.adapter.sdk.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import saas.adapter.sdk.callback.ConsumeMessageHookCallback;
import saas.adapter.sdk.callback.SendMessageHookCallback;
import saas.adapter.sdk.core.hook.RmqConsumerTenantConversionHookCallback;
import saas.adapter.sdk.core.hook.RmqProducerTenantConversionHookCallback;

/**
 * @title: OmsTenantAdapterHookCallbackConfig
 * @description: rmq钩子回调配置类
 * @author: guan.xin
 * @create: 2021-11-25 09:31
 * @since: JDK8
 */
@Configuration
public class OmsTenantAdapterHookCallbackConfig {

    @Bean
    public ConsumeMessageHookCallback consumeMessageHookCallback() {
        return new RmqConsumerTenantConversionHookCallback();
    }

    @Bean
    public SendMessageHookCallback sendMessageHookCallback() {
        return new RmqProducerTenantConversionHookCallback();
    }

}
